package com.example.shop.user.dto;

import com.example.shop.user.enums.Sex;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateDeserializer;
import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateSerializer;
import lombok.Data;
import org.springframework.web.multipart.MultipartFile;

import java.time.LocalDate;

/**
 * 存放个人信息中要修改的信息，不想修改请设置对应的属性为null
 */
@Data
public class UserPersonalInfoParam {
    private MultipartFile userAvatar;
    private String userName;
    private Sex userSex;
    private String userArea;
    @JsonDeserialize(using = LocalDateDeserializer.class)
    @JsonSerialize(using = LocalDateSerializer.class)
    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
    private LocalDate userDateBirth;
    //个性签名
    private String userSignature;

}
